package com.york.subject.domain.convert;

import com.york.subject.domain.entity.SubjectLabelBO;
import com.york.subject.infra.basic.entity.SubjectLabel;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * 拦截器，实现转换器功能，因为我们需要的是SubjectCategory对象，而该模块使用SubjectCategoryBO
 */
@Mapper
public interface SubjectLabelConverter {

    // 返回实现接口的实例
    SubjectLabelConverter INSTANCE = Mappers.getMapper(SubjectLabelConverter.class);

    SubjectLabel convertBoToLabel(SubjectLabelBO subjectLabelBO);

    SubjectLabelBO convertLabelToBO(SubjectLabel subjectLabel);

    List<SubjectLabelBO> convertBoToLabel(List<SubjectLabel> subjectLabelList);
}
